// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_c;

import java.util.*;

// Referenced classes of package com.nnee.c:
//            e, p

public class cls_j extends cls_e
{

    public cls_j()
    {
        b = new Vector();
        c = new Vector();
        d = new Vector();
        e = new Vector();
        f = new Vector();
    }

    private void a(Vector vector, Vector vector1, int k)
    {
        for(int l = 0; l < vector.size(); l++)
        {
            cls_p p1 = (cls_p)vector.elementAt(l);
            if(p1 != null)
                p1.b(k);
            vector1.add(vector.elementAt(l));
        }

        vector.clear();
    }

    private void a(Vector vector, Vector vector1, int k, boolean flag, int l)
    {
        if(vector != vector1) {
        	LinkedList linkedlist = new LinkedList();
            for(int i1 = -1 + vector.size(); i1 >= 0; i1--)
            {
                cls_p p1 = (cls_p)vector.elementAt(i1);
                if(p1 != null && p1.g() == k)
                {
                    vector.remove(i1);
                    p1.b(l);
                    linkedlist.add(p1);
                }
            }

            if(linkedlist.size() > 0)
            {
                Collections.reverse(linkedlist);
                vector1.addAll(0, linkedlist);
            }
        }
    }

    private void a(Vector vector, Vector vector1, cls_p p1)
    {
        for(int k = -1 + vector.size(); k >= 0; k--)
        {
            cls_p p2 = (cls_p)vector.elementAt(k);
            if(p2.a(p1))
            {
                vector.remove(k);
                vector1.add(p2);
            }
        }
    }

    private void a(Vector vector, Vector vector1, Class class1)
    {
        for(int k = -1 + vector.size(); k >= 0; k--)
        {
            cls_p p1 = (cls_p)vector.elementAt(k);
            if(class1.isInstance(p1) )
            {
                vector.remove(k);
                vector1.add(p1);
            }
        }

    }

    private Vector c(int k)
    {
    	Vector vector = null;
        switch(k & 0xff)
        {
        
        case 0:
        	 vector = f;
        break;
        case 2:
        	vector = d;
            break;
        case 3:
        	vector = c;
            break;
        case 4:
        	vector = b;
            break;
        default:
        case 1:
        	vector = e;
        break;
        }
        return vector;
         
    }

    public Object a()
    {
        return h();
    }

    public   Object a(int k)
    {
        return b(k);
    }

    public Vector a(Class class1)
    {
        Vector vector;
        vector = null;
        if(class1 == null)
            return null;
        vector = new Vector();
        Object aobj[] = j;
        
        a(b, vector, class1);
        a(c, vector, class1);
        a(d, vector, class1);
        a(e, vector, class1);
        a(f, vector, class1);
        return vector;
    }

    public Vector a(Vector vector, cls_p p1)
    {
        if(vector == null)
            vector = new Vector();
        if(!p1.e())
        	 return null;
        Object aobj[] = j;
       
        a(b, vector, p1);
        a(c, vector, p1);
        a(d, vector, p1);
        a(e, vector, p1);
        a(f, vector, p1);
        return vector;
    }

    public void a(int k, int l)
    {
        if(k >= 0) 
        {
        	boolean flag;
            int i1;
            Vector vector;
            Object aobj[];
            Exception exception;
            if((l & 0x100) != 0)
                flag = true;
            else
                flag = false;
            i1 = l & 0xff;
            aobj = j;
            
            vector = c(i1);
            if(!flag)
                return;
            a(f, vector, k, flag, i1);
            a(e, vector, k, flag, i1);
            a(d, vector, k, flag, i1);
            a(c, vector, k, flag, i1);
            a(b, vector, k, flag, i1);
        }
 
    }

    public void a(cls_p p1)
    {
        a(p1, 1);
    }

    public void a(cls_p p1, int k)
    {
        boolean flag = false;
        if(p1 != null) 
        {
        	int l;
            if((k & 0x100) != 0)
                flag = true;
            l = k & 0xff;
            Object aobj[] = j;
            
            switch(l)
            {
          
            case 0:
            	
            	if(flag)
                    f.insertElementAt(p1, 0);
                else
                    f.add(p1);
            	break;
            case 2:
            	 if(flag)
                     c.insertElementAt(p1, 0);
                 else
                     c.add(p1);
                   
            	break;
            case 3:
            	if(flag)
                    c.insertElementAt(p1, 0);
                else
                    c.add(p1);
            	break;
            case 4:
            	if(flag)
                    c.insertElementAt(p1, 0);
                else
                    c.add(p1);
            	break;
            case 5:
            	break;
            default:
            case 1:
            	if(!flag)
                    return;
                e.insertElementAt(p1, 0);
                
                
            	break;
            }
            ((Object) (j)).notifyAll();
            
           
        }
 
    }

    public   void a(Object obj)
    {
        a((cls_p)obj);
    }

    public cls_p b(int k)
    {
        Object aobj[] = j;
        cls_p p1 = null;
        if(k < 0) {
        	
        } else{
        	 if(k >= b.size()) {
        		 int l = k - b.size();
        	        if(l >= c.size()){
        	        	int i1 = l - c.size();
        	            if(i1 >= d.size()) {
        	            	int j1 = i1 - d.size();
        	                if(j1 >= e.size()) {
        	                	int k1 = j1 - e.size();
        	                    if(k1 >= f.size()) {
        	                    	p1 = null;
        	                    } else {
        	                    	p1 = (cls_p)f.remove(k1);
        	                    }
        	                }else {
        	                	p1 = (cls_p)e.remove(j1);
        	                }
        	            }else
        	            {
        	            	p1 = (cls_p)d.remove(i1);
        	            }
        	        } else {
        	        	p1 = (cls_p)c.remove(l);
        	        }
        	 }else{
        		 p1 = (cls_p)b.remove(k);
        	 }
        }
        
        return p1;
 
    }

    public   Object b()
    {
        return i();
    }

    public boolean b(cls_p p1)
    {
        boolean flag = false;
        if(p1 != null) 
        {
        	 Object aobj[] = j;
             
             if(b.remove(p1) || c.remove(p1) || d.remove(p1) || e.remove(p1) || f.remove(p1))
                 flag = true;
             
        }
 
        return flag;
 
    }

    public   boolean b(Object obj)
    {
        return b((cls_p)obj);
    }

    public Vector c(cls_p p1)
    {
        return a(new Vector(), p1);
    }

    public void f()
    {
        Object aobj[] = j;
        
        b.clear();
        c.clear();
        d.clear();
        e.clear();
        f.clear();
        ((Object) (j)).notifyAll();
        return;
    }

    public cls_p h()
    {
    	cls_p p1 = null;
        Object aobj[] = j;
       
        if(e.size() <= 0 && f.size() <= 0 && d.size() <= 0 && c.size() <= 0 && b.size() <= 0){
        	try
            {
                ((Object) (j)).wait();
            }
            catch(Exception exception1) { }
            p1 = i();
        }else {
        	i();
        }
        return p1;
 
    }

    public cls_p i()
    {
        Object aobj[] = j;
      
        cls_p p1 = b(0);
        return p1;
    }

    public void j()
    {
        Object aobj[] = j;
        
        a(f, e, 1);
        a(b, f, 0);
        a(c, f, 0);
        a(d, f, 0);
        a(e, f, 0);
        return;
    }
   

    private static final int g = 1;
    private static final int h = 6;
    private static final int i = 12;
    private static final Object j[] = new Object[0];
    Vector b;
    Vector c;
    Vector d;
    Vector e;
    Vector f;


}
